function y = helical(x)
%Helical vally function
%n=3,m=3,x0=[-1,0,0]
%fmin1=f7([1;0;0])=0
%Author:Ji Lin
y(1)=10*(x(3)-10*theta(x(1),x(2)));
y(2)=10*((x(1)^2+x(2)^2)^(1/2)-1);
y(3)=x(3);
y=sum(y.^2);
function w=theta(x1,x2)
if x1>0
    w=atan(x2/x1)/(2*pi);
elseif x1<0
    w=atan(x2/x1)/(2*pi)+0.5;
end